﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TarreOA.TarreOABLL;
using TarreOA.TarreOAModels;

public partial class admin_SellInfoList : System.Web.UI.Page
{
    static List<SellInfo> list = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SellInfo sellInfo = new SellInfo();
            Client client = new Client();
            client.ClientId=Convert.ToInt32(Request.QueryString["cid"]);
            sellInfo.Client = client;
            list = SellInfoManager.FindBlurSellInfo(sellInfo,0);
            GridView1.DataSource = list;
            GridView1.DataBind();
        }
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        GridView1.DataSource = list;
        GridView1.DataBind();
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName=="showInfo")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "window.showModalDialog ('SellInfo.aspx?sid=" + e.CommandArgument.ToString() + "', '','status:no;center:yes;scroll:yes;resizable:no;help:no;dialogWidth:400px;dialogHeight:300px');", true);
        }
    }
}
